package cn.cheln.explorer.ds.util;

import android.content.ContentValues;
import cn.cheln.explorer.beans.FileInfo;
import cn.cheln.explorer.beans.FileUtil;
import cn.cheln.explorer.beans.MusicInfo;
import cn.cheln.explorer.config.Config;
import cn.cheln.explorer.ds.scan.PinyinHelper;
import cn.cheln.support.images.FileTypeInfo;
import cn.cheln.support.images.MimeUtil;
import cn.cheln.support.log.Logs;
import java.io.File;

public class ContentValuesUtil
{
  static ContentValues contentvalues = new ContentValues();

  public static ContentValues constructContentValues(FileInfo paramFileInfo, FileTypeInfo paramFileTypeInfo)
  {
    String str;
    monitorenter;
    try
    {
      contentvalues.clear();
      File localFile = paramFileInfo.getFile();
      contentvalues.put("_data", localFile.getAbsolutePath());
      ContentValues localContentValues1 = contentvalues;
      if (localFile.isDirectory());
      for (int i = 12289; ; i = 12288)
      {
        localContentValues1.put("format", Integer.valueOf(i));
        ContentValues localContentValues2 = contentvalues;
        if ((paramFileInfo.sortKey != null) && (!(paramFileInfo.sortKey.trim().equals(""))))
          break;
        str = PinyinHelper.transfer(localFile.getName());
        localContentValues2.put("sort_key", str);
        contentvalues.put("title", localFile.getName());
        contentvalues.put("_size", Long.valueOf(localFile.length()));
        contentvalues.put("date_modified", Long.valueOf(localFile.lastModified() / 1000L));
        contentvalues.put("mime_type", paramFileTypeInfo.mime);
        if (paramFileInfo instanceof MusicInfo)
        {
          contentvalues.put("album_id", ((MusicInfo)paramFileInfo).album_id);
          Logs.i("", "------------ aa " + ((MusicInfo)paramFileInfo).album_id);
          contentvalues.put("album_artist_id", ((MusicInfo)paramFileInfo).album_artist_id);
        }
        ContentValues localContentValues3 = contentvalues;
        return localContentValues3;
      }
    }
    finally
    {
      monitorexit;
    }
  }

  public static ContentValues constructContentValues(File paramFile, String paramString)
  {
    monitorenter;
    while (true)
    {
      int i;
      try
      {
        String str;
        contentvalues.clear();
        contentvalues.put("_data", paramFile.getAbsolutePath());
        ContentValues localContentValues1 = contentvalues;
        if (Config.isLewaRom);
        for (Object localObject2 = FileUtil.getNameTitle(paramFile.getAbsolutePath()); ; localObject2 = str)
        {
          localContentValues1.put("title", (String)localObject2);
          contentvalues.put("_size", Long.valueOf(paramFile.length()));
          contentvalues.put("date_modified", Long.valueOf(paramFile.lastModified() / 1000L));
          contentvalues.put("mime_type", MimeUtil.parseMime(paramFile));
          ContentValues localContentValues2 = contentvalues;
          if (!(paramFile.isDirectory()))
            break;
          i = 12289;
          localContentValues2.put("format", Integer.valueOf(i));
          contentvalues.put("sort_key", PinyinHelper.transfer(paramFile.getName()));
          ContentValues localContentValues3 = contentvalues;
          return localContentValues3;
          str = paramFile.getName();
        }
      }
      finally
      {
        monitorexit;
      }
    }
  }
}

/* Location:           H:\360云盘\lewa_explorer_3.0\bin\FileApp_orig_dex2jar.jar
 * Qualified Name:     cn.cheln.explorer.ds.util.ContentValuesUtil
 * JD-Core Version:    0.5.2
 */